/*
day388 
2020.9.19 
*/ 
#include<iostream>
#include<vector>
using namespace std;

class Solution {
public:
    bool canThreePartsEqualSum(vector<int>& A) {
		for(int i=1;i<A.size();++i)
		{
			A[i]+=A[i-1];
		}
		
		if(A.back()%3!=0)
		{
			return false;
		}
		
		int tem1=A.back()/3;
		int index=0;
		while(index<A.size())
		{
			if(A[index]==tem1)
			{
				break;
			}
			index++; 
		}
		if(index==A.size())
		{
			return false;
		}
		
		++index;
		int tem2=tem1*2;
		while(index<A.size())
		{
			if(A[index]==tem2)
			{
				break;
			}
			++index;
		}
		
		
		return index<A.size()-1;
    }
};

int main()
{
	return 0;
}
